import Vue from 'vue'
import '@/api/request'
import App from './App.vue'
import router from './router'
// import './plugins/element.js'
import '@/assets/css/base.css'

Vue.config.productionTip=false

// 使用vue-table-with-tree-grid插件
import treeTable from 'vue-table-with-tree-grid'
// 注册为全局可用组件
Vue.component('tree-table',treeTable);

// 导入富文本编辑器组件
import VueQuillEditor from 'vue-quill-editor'
// 注册为全局可用组件
Vue.use(VueQuillEditor, /* { default global options } */)

// 时间过滤器
Vue.filter('dataFormat',(originVal)=>{
  const dt=new Date(originVal*1000);
  const y=dt.getFullYear();
  const m=(dt.getMonth()+1+'').padStart(2,'0');
  const d=(dt.getDate()+'').padStart(2,'0')//填充

  const hh=(dt.getHours()+'').padStart(2,'0');
  const mm=(dt.getMinutes()+'').padStart(2,'0');
  const ss=(dt.getSeconds()+'').padStart(2,'0');

  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`

})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
